<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
   <!-- axios库地址：https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js
  城市数据地址：http://hmajax.itheima.net/api/city -->

  <p class="my-p"></p>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  <script>
    axios({
      url: 'http://hmajax.itheima.net/api/city',
      //查询参数
      params: {
        pname: '河南省'
      }
    }).then(result => {
      console.log(result)
      console.log(result.data.list)
      console.log(result.data.list.join('<br>'))
      document.querySelector('.my-p').innerHTML = result.data.list.join('<br>')

      
    })
  </script>
</body>
</html>